Skip to content

Conversation

@keefehuang
Copy link
Collaborator

Allow for loop of qiskit -> rust -> qiskit

@keefehuang keefehuang linked an issue Jan 13, 2026 that may be closed by this pull request
@keefehuang keefehuang requested a review from Aerylia January 13, 2026 14:05
(Angle::Arbitrary(rad1), Angle::Pi4Rotations(n2)) => {
*rad1 += n2 as f64 * PI / 4.0;
}
_ => panic!("Cannot add Arbitrary Angle to Pi4 rotation"),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess you cannot say

(Angle::Pi4Rotations(n), Angle::Arbitrary(rad)) => { *self = Angle::Pi4Rotations(rad + n as f64 * PI / 4.0);}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same for subassign below

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, I don't think you can do this.


/// Composes a gadget onto a Clifford tableau if the angle is Clifford
/// Decomposes the Pauli gadget by performing naive decomposition into mapping to Z legs, CNOT walls and Z-rotations
pub fn compose_gadget(&mut self, rhs: (PauliString, Angle)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of inline panicing. You should probably return a Result<(), str> so you can catch it

]);

assert!(!pp1.commutes_with(&pp2));
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing tests for pi4 type angles. if too much work, you can make it an issue

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sprinkled pi4 angles into existing tests

#[cfg(test)]
mod tests {
#[test]
fn test_clifford_s() {}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

stub

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stub removed in rebase

@keefehuang keefehuang force-pushed the 71-allow-for-circuit-to-pauli-exponential branch from e4288d7 to ad35505 Compare January 15, 2026 14:12
Copy link
Contributor

@Aerylia Aerylia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@Aerylia Aerylia merged commit 769dfeb into main Jan 17, 2026
2 checks passed
@Aerylia Aerylia deleted the 71-allow-for-circuit-to-pauli-exponential branch January 17, 2026 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow for Circuit to Pauli Exponential

3 participants